<%= error_messages_for 'assignment' %>

<!--[form:assignment]-->
<table cellpadding=5 cellspacing= border=0 width=100%>
<tr>
<td><label for="assignment_name">Name</label><br/>
</td>
<td>
<%= text_field 'assignment', 'name'  %>
</td>
</tr>

<tr>
<td><label for="client_working_domain_id">Working Domain</label>
</td>
<td>
<% @domains = WorkingDomain.find(:all, :order => "name" ).map {|u| [u.name, u.id]}%>
<% @domains.insert(0,['-SELECT-',nil]) %>
<%= select 'assignment', 'working_domain_id', @domains %>	
</td>
</tr>

<tr>
<td><label for="assignment_periodicity">Periodicity</label><br/><br/>
</td>
<td>
<%= select 'assignment', 'periodicity', Assignment::PERIODICITY %>
</td>
</tr>

<tr>
<td><label for="assignment_completion_day">Date of Completion (DD/MM)</label>
</td>
<td>
<% days = (1..31).map {|u| [u, u]} %>	
<% days.insert(0,['-SELECT-',nil]) %>
<%= select 'assignment', 'completion_day', days  %>
<label for="assignment_completion_month">&nbsp;</label>
<%= select 'assignment', 'completion_month', Assignment::MONTHS %>
</td>
</tr>

<tr>
<td><label for="assignment_avg_time_required">Avg time required (Days)</label>
</td>
<td>
<%= text_field 'assignment', 'avg_time_required'  %></p>
</td>
</tr>

<tr>
<td><label for="assignment_fees">Fees (Rs.)</label><br/>
</td>
<td>
<%= text_field 'assignment', 'fees'  %></td>
</tr>


<tr>
<td><label for="assignment_employee_id">Assigned Staff</label><br/>
</td>
<td>
<% @employees = Employee.find(:all, :order => "name" ).map {|u| [u.name, u.id]}%>
<% @employees.insert(0,['-SELECT-',nil]) %>
<%= select 'assignment', 'employee_id', @employees %>	
</tr>


</table>


<!--[eoform:assignment]-->

